Skip to content

Conversation

Tropix126
Copy link
Contributor

@Tropix126 Tropix126 commented Aug 28, 2025

This PR adds standard library support for the VEX V5 Brain (armv7a-vex-v5 target). It is more-or-less an updated version of the library-side work done in #131530.

This was a joint effort between me, @lewisfm, @max-niederman, @Gavin-Niederman and several other members of the vexide project.

Background

VEXos is a fairly unconventional operating system, with user code running in a restricted enviornment with regards to I/O capabilities and whatnot. As such, several OS-dependent APIs are unsupported or have partial support (such as std::net, std::process, and most of std::thread). A more comprehensive list of what does or doesn't work is outlined in the updated target documentation. Despite these limitations, we believe that libstd support on this target still has value to users, especially given the popular use of this hardware for educational purposes. For some previous discussion on this matter, see this comment.

SDK Linkage

VEXos doesn't really ship with an official libc or POSIX-style platform API (and though it does port newlib, these are stubbed on top of the underlying SDK). Instead, VEX provides their own SDK for calling platform APIs. Their official SDK is kept proprietary (with public headers), though open-source implementations exist. Following the precedent of the armv6k-nintendo-3ds team's work in #95897, we've opted not to directly link libstd to any SDK with the expectation that users will provide their own - either through vex-sdk-build (which will download the official SDK from VEX), vex-sdk-jumptable (a compatible, open-source reimplementation), or potentially through linking the PROS kernel. The vex-sdk crate used in the VEXos PAL provides libc-style FFI bindings for any compatible system library, so any of these options should work fine. A functional demo project using vex-sdk-build can be found here.

Future Work

This PR implements virtually everything we are currently able to implement given the current capabilities of the platform. The exception to this is file directory enumeration, though the implementation of that is sufficiently gross enough to drive us away from supporting this officially.

Additionally, I have a working branch implementing the panic_unwind runtime for this target, which is something that would be nice to see in the future, though given the volume of compiler changes i've deemed it out-of-scope for this PR.

@rustbot
Copy link
Collaborator

rustbot commented Aug 28, 2025

r? @tgross35

rustbot has assigned @tgross35.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added A-tidy Area: The tidy tool S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Aug 28, 2025
@rustbot
Copy link
Collaborator

rustbot commented Aug 28, 2025

Some changes occurred in src/doc/rustc/src/platform-support

cc @Noratrieb

These commits modify the library/Cargo.lock file. Unintentional changes to library/Cargo.lock can be introduced when switching branches and rebasing PRs.

If this was unintentional then you should revert the changes before this PR is merged.
Otherwise, you can ignore this comment.

These commits modify compiler targets.
(See the Target Tier Policy.)

The list of allowed third-party dependencies may have been modified! You must ensure that any new dependencies have compatible licenses before merging.

cc @davidtwco, @wesleywiser

@tgross35
Copy link
Contributor

I think the limitations here seem fine, and from a quick skim nothing jumps out to me as problematic. Nominating to make sure the team doesn't have any concerns.

@rustbot label +I-libs-nominated

@rustbot rustbot added the I-libs-nominated Nominated for discussion during a libs team meeting. label Aug 28, 2025
@rust-log-analyzer

This comment has been minimized.

@tgross35
Copy link
Contributor

@rustbot author

@rustbot rustbot removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Aug 30, 2025
@rustbot
Copy link
Collaborator

rustbot commented Aug 30, 2025

Reminder, once the PR becomes ready for a review, use @rustbot ready.

@rustbot rustbot added the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Aug 30, 2025
@Tropix126
Copy link
Contributor Author

@rustbot ready

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Aug 30, 2025
@tgross35
Copy link
Contributor

Thanks for the updates here, I'll take a more thorough look through after the libs meeting (next Wednesday).

@tgross35 tgross35 added S-waiting-on-team Status: Awaiting decision from the relevant subteam (see the T-<team> label). and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Aug 30, 2025
@bors
Copy link
Collaborator

bors commented Sep 3, 2025

☔ The latest upstream changes (presumably #146160) made this pull request unmergeable. Please resolve the merge conflicts.

@rustbot

This comment has been minimized.

@rustbot
Copy link
Collaborator

rustbot commented Sep 5, 2025

Some changes occurred in src/tools/cargo

cc @ehuss

@rustbot
Copy link
Collaborator

rustbot commented Sep 5, 2025

This PR was rebased onto a different master commit. Here's a range-diff highlighting what actually changed.

Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers.

@rustbot

This comment has been minimized.

@Tropix126
Copy link
Contributor Author

Tropix126 commented Sep 5, 2025

Submodule changes were unintentional, dealing with that :/

@bors
Copy link
Collaborator

bors commented Sep 6, 2025

☔ The latest upstream changes (presumably #146258) made this pull request unmergeable. Please resolve the merge conflicts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-tidy Area: The tidy tool I-libs-nominated Nominated for discussion during a libs team meeting. S-waiting-on-team Status: Awaiting decision from the relevant subteam (see the T-<team> label). T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants